package cn.wolfcode.rbac.service;

import cn.wolfcode.rbac.config.PageInfo;
import cn.wolfcode.rbac.model.DepartmentDO;
import cn.wolfcode.rbac.request.DepartmentRequest;
import cn.wolfcode.rbac.vo.DepartmentVO;

import java.util.List;
import java.util.Map;

/**
 * @author Lu.F
 * @version 1.0
 * @Description TODO
 * @date 2022/5/14 15:46
 */
public interface DepartmentService {


    /**
     * 修改或者新增部门信息
     * @param departmentRequest
     */
    void saveOrUpdate(DepartmentRequest departmentRequest);
    /**
     * 查询所有部门信息
     * @return
     */
    List<DepartmentDO> selectAll();

    /**
     * 根据主键查询部门信息
     * @param id
     * @return
     */
    DepartmentDO selectByPrimaryKey(Long id);

    /**
     * 添加部门信息
     * @param departmentRequest
     * @return
     */
    int insert(DepartmentRequest departmentRequest);

    /**
     * 修改部门信息
     * @param departmentRequest
     * @return
     */
    int updateByPrimaryKey(DepartmentRequest departmentRequest);

    /**
     * 根据主键删除部门信息
     * @param id
     * @return
     */
    int deleteByPrimaryKey(long id);

    /**
     * 分页显示部门信息
     * @param page
     * @param size
     * @return
     */
//    Map<String,Object> pageDepartment(int page, int size);
    PageInfo<DepartmentVO> pageDepartment(int page, int size);
}
